Code
import pandas as pd
# Define the file paths
file1_path = '/merged_unicef_data.csv'
# Read the CSV files
data1 = pd.read_csv(file1_path)
Global Negligence of School Hygiene
#The Hidden Crisis #Global Negligence of School Hygiene
###A Unicef Report ###By Ronika Budhiraja, Dublin City University, BAA1030
import pandas as pd
# Define the file paths
file1_path = '/merged_unicef_data.csv'
# Read the CSV files
data1 = pd.read_csv(file1_path)
##Introduction In a world where technological advancements, economic growth, and global security dominate headlines, an unseen crisis unfolds in silence: millions of children worldwide still lack access to basic hygiene in their schools. This silent emergency affects health, education, and long-term economic potential. While nations prioritize military expansion, investing billions into defense, an alarming proportion of schools remain without hygiene services, directly impacting life expectancy, disease prevention, and educational outcomes.
Is this truly the right investment for the future?
import pandas as pd
import plotly.express as px
# Load data
df = pd.read_csv('/merged_unicef_data.csv') # Change this to your path
# Prepare the data
df_clean = df.dropna(subset=['year', 'alpha_3_code', 'obs_value', 'Population, total'])
# Create a choropleth map with bubble sizes
fig = px.scatter_geo(
df_clean,
locations="alpha_3_code", # ISO-3 country codes
color="obs_value", # Color based on hygiene issues
size="Population, total", # Bubble size based on population
hover_name="country", # Hover shows country name
animation_frame="year", # Animate over years
projection="natural earth", # Natural Earth map
color_continuous_scale=px.colors.sequential.Teal, # Teal color scale
range_color=(0, 100),
size_max=50, # Max bubble size
title="Mapping the Crisis: Lack of Hygiene in Schools",
)
# Update layout for dark theme
fig.update_layout(
geo=dict(bgcolor='rgba(0,0,0,0)'),
paper_bgcolor='black',
plot_bgcolor='black',
font_color='white',
title_font_size=24,
coloraxis_colorbar=dict(
title="Avg. No Hygiene in Schools (%)",
tickprefix=""
)
)
# Show the figure
fig.show()##No Hygiene in the 21st Century? The world map visualization above showcases the proportion of schools without hygiene services over the 21st century, with the buble sizes indicating the population size.
The data reveals while pandemics such as COVID-19 may have exposed the urgency of hygiene, yet even today the services seem inadequate. While the poorest nations saw minimal progress even as the GDP and population continued to grow, a few of the wealthy nations too are struggling with school hygiene, proving that economic prosperity does not equate to better education infrastructure.
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# Load the merged data
merged_df = pd.read_csv('/merged_unicef_data.csv')
# Filter out missing values for a clean plot
scatter_df = merged_df.dropna(subset=['GDP per capita (constant 2015 US$)', 'obs_value'])
# Set up the plot style
plt.style.use('dark_background')
# Create the figure
plt.figure(figsize=(12, 8))
# Bubble sizes
sizes = scatter_df['Population'] / 100000 if 'Population' in scatter_df.columns else 100
# First: Plot "glow" layer
plt.scatter(
scatter_df['obs_value'],
scatter_df['GDP per capita (constant 2015 US$)'],
s=sizes * 1.5,
alpha=0.08,
color='lightblue',
edgecolors='none'
)
# Second: Plot real bubbles
plt.scatter(
scatter_df['obs_value'],
scatter_df['GDP per capita (constant 2015 US$)'],
s=sizes,
alpha=0.4,
color='lightblue',
edgecolors='white',
linewidth=0.5
)
# Third: Add regression line
sns.regplot(
data=scatter_df,
x='obs_value',
y='GDP per capita (constant 2015 US$)',
scatter=False, # Don't plot the default seaborn scatter points
color='red',
line_kws={'linewidth': 2} # Make regression line a bit thicker
)
# Titles and labels
plt.title('The Growing Disparity', fontsize=24, color='lightblue', pad=20)
plt.xlabel('Avg. Proportion of Schools with No Hygiene service', fontsize=14, color='lightgrey')
plt.ylabel('GDP per capita (constant 2015 US$)', fontsize=14, color='lightgrey')
# Adjust grid, ticks
plt.grid(True, which='both', linestyle='--', linewidth=0.5, alpha=0.5)
plt.xticks(color='lightgrey')
plt.yticks(color='lightgrey')
plt.tight_layout()
plt.show()##The Growing Disparity Paradox The scatter plot shows countries with rapid GDP growth often prioritize economic expansion over human capital investment, making us question:
Why does economic growth not translate into better schooling conditions?
import pandas as pd
import plotly.graph_objects as go
# Load data
df = pd.read_csv('/merged_unicef_data.csv') # Update the path accordingly
# Prepare data
# Group by year and take mean values
df_yearly = df.groupby('year').agg({
'obs_value': 'mean',
'GDP growth (annual %)': 'mean'
}).reset_index()
# Create the figure
fig = go.Figure()
# Add Hygiene (obs_value) trace
fig.add_trace(go.Scatter(
x=df_yearly['year'],
y=df_yearly['obs_value'],
mode='lines+markers',
name='No Hygiene in Schools (%)',
line=dict(color='teal', width=3),
marker=dict(size=6)
))
# Add GDP Growth trace
fig.add_trace(go.Scatter(
x=df_yearly['year'],
y=df_yearly['GDP growth (annual %)'],
mode='lines+markers',
name='GDP Growth (annual %)',
line=dict(color='lightblue', width=3, dash='dash'),
marker=dict(size=6)
))
# Update layout for dark theme
fig.update_layout(
title="Hygiene Investment vs GDP Growth Over the Years",
xaxis_title="Year",
yaxis_title="Percentage (%)",
paper_bgcolor='black',
plot_bgcolor='black',
font_color='white',
legend=dict(
x=0.02, y=0.98,
bgcolor='rgba(0,0,0,0)',
bordercolor='white'
),
title_font_size=24,
xaxis=dict(showgrid=False),
yaxis=dict(showgrid=False)
)
# Show the figure
fig.show()##Government Budget Allocation This Time Series chart illustrates how government budgets are allocated making you question: - If a child’s right to sanitation is as critical as a nation’s right to security? - What does it say about a country’s priorities when tanks are funded before toilets in schools?
Even with massive increase and decrease of global GDP, the rate at which the avg proportion of no hygiene in schools continue increasing at a massive rate.
import pandas as pd
import plotly.express as px
# Load data
df = pd.read_csv('/merged_unicef_data.csv') # Update path accordingly
# Prepare data
# Take latest year for each country (assuming hygiene improves over time)
df_latest = df.sort_values('year').groupby('country').last().reset_index()
# Select top 10 countries with highest lack of hygiene
top10 = df_latest.nlargest(10, 'obs_value')
# Create horizontal bar chart
fig = px.bar(
top10,
x='obs_value',
y='country',
orientation='h',
text='obs_value',
color='obs_value',
color_continuous_scale=px.colors.sequential.Teal,
)
# Update layout
fig.update_layout(
title="Top 10 Countries by Lack of Hygiene in Schools",
xaxis_title="No Hygiene in Schools (%)",
yaxis_title="Country",
paper_bgcolor='black',
plot_bgcolor='black',
font_color='white',
coloraxis_colorbar=dict(
title="No Hygiene (%)"
)
)
# Flip Y-axis so highest is on top
fig.update_yaxes(autorange="reversed")
# Show chart
fig.show()##The Long Dirty Rat-Race This race bar chart dynamically ranks the worst 10 countries based on the increase in their lack of hygiene scores.
This is a wake-up call!
##Moving Forward So, where does it leave us now? 1. Re-evaluating national budgets: Prioritize sanitation in foreign aid and development projects. 2. Leveraging International Cooperations: Establish global funds for school sanitation, similar to climate change funds. 3. Stricter Policy Implementations: Enforce strict hygiene standards and introduce hygiene tax incentives.
The choice is clear. It’s time to rethink our priorities. It’s time to invest in a future that values children’s education as much as national security.